//
//  ZGData.m
//  扫码
//
//  Created by 鲍志刚 on 16/4/5.
//  Copyright © 2016年 鲍志刚. All rights reserved.
//

#import "ZGData.h"
#import "UserData.h"


@interface ZGData ()

@property (weak, nonatomic) IBOutlet UILabel *idLabel;

@property (weak, nonatomic) IBOutlet UILabel *randomLabel;

@property (weak, nonatomic) IBOutlet UILabel *numberLabel;

@property (weak, nonatomic) IBOutlet UILabel *timeLabel;

@property (weak, nonatomic) IBOutlet UILabel *typeLabel;

@property (weak, nonatomic) IBOutlet UILabel *cityLabel;

@end


@implementation ZGData

-(void)setUserData:(UserData *)userData {
    
    _userData = userData;
    
    self.idLabel.text = [NSString stringWithFormat:@"%ld",userData.id];
    
    self.randomLabel.text = userData.random;
    
//    self.numberLabel.text = userData.number;
    
    self.numberLabel.text = [NSString stringWithFormat:@"%zd",userData.number];
    
    self.timeLabel.text = userData.createTime;
    
    self.typeLabel.text = [NSString stringWithFormat:@"%ld",userData.type];
    
    self.cityLabel.text = userData.city;
    
    
  
}

- (void)awakeFromNib {
    [super awakeFromNib];
    
}

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
    
    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        [self setUpUI];
    }
    
    return self;
}

#pragma mark - 设置界面
-(void)setUpUI {
    
    
    
    [self setUpData];
    
}


#pragma mark - 设置数据
- (void)setUpData {
    
    
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
